Managing Role Services
The
modular architecture of IIS enables you to add or remove role services
quickly and easily after the Web Server (IIS) role has been enabled on
a computer running Windows Server 2008. The most common reasons for
changing the role service configuration are to support a new type of
Web application or Web service. You can also remove unnecessary
services if they are no longer needed or the technical requirements
have changed. Because the removal or addition of a role service affects
the configuration of the entire server, make sure to consider the
potential effects on all the Web sites on the server.
To
do this, open Server Manager, expand Roles, right-click Web Server
(IIS), and choose either Add Role Services or Remove Role Services. The
dialog box will show which components are installed. The check mark
means that an item (or an item and all its children, if there are any)
have been installed. A cleared check box indicates that the item has
not been installed. A dimmed box means that some of the role services
components have been installed.
When
you add or remove role services, you’ll receive a confirmation message,
and then the process will continue. If a reboot of the computer is
required, the configuration process will resume automatically whenever
you next log on to the computer.
Using Command-Line and Automated Installation Options
Organizations
that rely on IIS often need to deploy many different installations of
IIS. Although you can perform the process locally on each server, it is
often more efficient to create scripts or commands for performing the
necessary steps. There are several methods of performing automated and
command-line–based installations.
The
ServerManagerCmd.exe utility can be launched to install the Web Server
(IIS) server role from the command line. For example, the command ServerManagerCmd.exe –install Web-Server will attempt to install the default Web server components. You can use the ServerManagerCmd.exe –query command to view which roles and features have been installed on the local computer. (See Figure 10.)
This can be helpful when you want to collect complete configuration
information quickly to determine whether changes are required to
support a new Web application. For more information about using this
command, type ServerManagerCmd.exe -? at a command prompt. You can also use this command to add or remove features such as WSRM.
Another
option for performing a command-line installation of the Web Server
(IIS) server role is to use the Windows Package Manager (PkgMgr.exe)
utility. Windows Package Manager uses an XML file to store details
about which features and options should be included in the IIS
installation. For more information about using this utility, type PkgMgr.exe -? at a command prompt.
Removing the Web Server (IIS) Role
If
you no longer require an installation of Windows Server 2008 to serve
as a Web server, you can remove IIS and all its related components by
using the Remove Roles command in Server Manager. Keep in mind,
however, that many different components and features of the operating
system might require the Web Server to be installed. These dependent
features either will be removed or the dependent functionality will be
made available. Figure 11 shows the Confirm Removal Selections page.
Depending
on which features were installed, it might be necessary to restart the
computer during the removal process. If that is necessary, the process
will resume automatically whenever a user next logs on to the computer.
Removing
the Web Server (IIS) role will remove all the binary files and role
services that are associated with the Web server. The basic server
configuration, including the list of Web sites and their settings, will
be retained if you choose to reinstall the Web server role. Actual Web
site content will not be deleted automatically. If you are planning to
remove Web services permanently from the server, manually delete any
remaining Web pages and data that are no longer required.